home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RIReqLib.doc < prev    next >
Encoding:
Text File  |  1995-01-28  |  7.7 KB  |  173 lines

  1. -----------------------------------------------------------------------------
  2. ====                      RI REQ Library V0.9 (C)1994             ====
  3. -----------------------------------------------------------------------------
  4.  
  5.                           Written By Steven Matty
  6.                         ©1994 Leading Edge Software
  7.  
  8.  
  9. The well known Req.Library for the Amiga is one of the best file requesters
  10. around, so I wrote this small lib to enable Blitz users to have Req
  11. requesters in their programs with the minimum of hassle.
  12.  
  13. * PLEASE NOTE * That this library must have at least v2.2 of the Req.Library
  14. available.
  15.  
  16. Command List:
  17.  
  18.   ReqOutput()
  19.   ReqFileRequest()
  20.   ReqFileLoc()
  21.  
  22.  
  23. Statement: ReqOutput
  24. ------------------------------------------------------------------------------
  25. Modes  : Amiga
  26. Syntax : ReqOutput windownumber
  27.  
  28. This command sets the ReqLib.library to put all requesters onto the
  29. window specified by <windownumber>. If this command is not called
  30. then the requesters will appear on the Default Public Screen.
  31.  
  32.  
  33. Function: ReqFileRequest
  34. ------------------------------------------------------------------------------
  35. Modes  : Amiga
  36. Syntax : pathname$=ReqFileRequest([title$[,flags]])
  37.  
  38. This opens up the standard file requester. If <title$> is given then
  39. the text will appear on the requester title bar.
  40. The optional <flags> parameter specifies a flag setting (see below)
  41. for use. If this is omitted then the last flag setting is used.
  42.  
  43.  
  44. Function: ReqFileLoc
  45. ------------------------------------------------------------------------------
  46. Modes  : Amiga/Blitz
  47. Syntax : memorylocation.l=ReqFileLoc
  48.  
  49. This simply returns the address in memory where the Req.Library file requester
  50. stucture is located.
  51.  
  52.  
  53.  
  54. FLAGS
  55. =====
  56.  
  57. Below is a list of possible flag settings and a brief description of each.
  58.  
  59.  
  60. #FRQSHOWINFOB     = %1   ;Set to show .info files. Default is not.
  61. #FRQEXTSELECTB    = %10   ;Extended select.  Default is not.
  62. #FRQCACHINGB      = %100   ;Directory caching.  Default is not.
  63. #FRQGETFONTSB     = %1000   ;Font requester rather than a file requester.
  64. #FRQINFOGADGETB   = %10000   ;Hide-info files gadget.
  65. #FRQHIDEWILDSB    = %100000   ;DON'T want 'show' and 'hide' string gadgets.
  66. #FRQABSOLUTEXYB   = %1000000   ;Use absolute x,y positions rather than centering on mouse.
  67. #FRQCACHEPURGEB   = %10000000   ;Purge the cache whenever the directory date stamp changes if this is set.
  68. #FRQNOHALFCACHEB  = %100000000   ;Don't cache a directory unless it is completely read in when this is set.
  69. #FRQNOSORTB       = %1000000000   ;DON'T want sorted directories.
  70. #FRQNODRAGB       = %10000000000  ;DON'T want a drag bar and depth gadgets.
  71. #FRQSAVINGB       = %100000000000  ;Are selecting a file to save to.
  72. #FRQLOADINGB      = %1000000000000  ;Are selecting a file(s) to load from.
  73. #FRQDIRONLYB      = %10000000000000  ;Allow the user to select a directory, rather than a file.
  74.  
  75.  
  76. STRUCTURE
  77. =========
  78.  
  79. Below is a description of the Req.Library file requester structure.
  80.  
  81. STRUCTURE AFileRequester,0
  82.   UWORD frq_VersionNumber   ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
  83.  
  84.   ;You will probably want to initialize these three variables.
  85.   APTR  frq_Title     ; Hailing text
  86.   APTR  frq_Dir       ; Directory array (must be DSIZE+1 characters long)
  87.   APTR  frq_File      ; Filename array (must be FCHARS+1 characters long)
  88.   ;If you initialize this variable then the file requester will place the complete path name in here on exit.
  89.   APTR  frq_PathName      ; Complete path name array - (must be DSIZE+FCHARS+2 long)
  90.   ;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
  91.   ;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
  92.   ;pr_WindowPtr field in your process structure.
  93.   APTR  frq_Window      ; Window requesting or NULL
  94.   ;Initialize these to the number of lines and columns you want to appear in the inner window that
  95.   ;displays the file names.  If you leave these set to zero then default values will be used.
  96.   UWORD frq_MaxExtendedSelect   ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
  97.   UWORD frq_numlines      ; Number of lines in file window.
  98.   UWORD frq_numcolumns      ; Number of columns in file window.
  99.   UWORD frq_devcolumns      ; Number of columns in device window.
  100.   ULONG frq_Flags     ; Various - umm - flags.  See above for more info.
  101.   UWORD frq_dirnamescolor ;These five colors will all default
  102.   UWORD frq_filenamescolor  ;to color one if you don't specify
  103.   UWORD frq_devicenamescolor  ;a color (ie; if you specify color zero).
  104.   UWORD frq_fontnamescolor  ;If you want color zero to be used, specify
  105.   UWORD frq_fontsizescolor  ;color 32, or some other too large number
  106.           ;which mods down to zero.
  107.  
  108.   UWORD frq_detailcolor   ;If both of these colors are specified as
  109.   UWORD frq_blockcolor    ;zero then the block pen will be set to one.
  110.  
  111.   UWORD frq_gadgettextcolor ;The color for the text of the five boolean gadgets.  Defaults to 1.
  112.   UWORD frq_textmessagecolor  ;The color for the message at the screen top.  Defaults to 1.
  113.   UWORD frq_stringnamecolor ;The color for the words Drawer, File, Hide and Show.  Defaults to 3.
  114.   UWORD frq_stringgadgetcolor ;The color for the borders of the string gadgets.  Defaults to 3.
  115.           ;Unfortunately it is not possible to specify
  116.           ;the color of the actual text in an Intuition
  117.           ;string gadget.
  118.   UWORD frq_boxbordercolor  ;The color for the boxes around the file and directory areas.  Defaults to 3.
  119.   UWORD frq_gadgetboxcolor  ;The color for the boxes around the five boolean gadgets.  Defaults to 3.
  120.  
  121.   STRUCT  frq_RFU_Stuff,36    ;This area, which is reserved for
  122.             ;future use, should all be zero.
  123.  
  124.   STRUCT  frq_DirDateStamp,ds_SIZEOF  ; A copy of the cached directories date stamp.
  125.             ; There should never be any need to change this.
  126.  
  127.   UWORD frq_WindowLeftEdge;   ;These two fields are only used when the
  128.   UWORD frq_WindowTopEdge;    ;FRQABSOLUTEXY flag is set.  They specify
  129.             ;the location of the upper left hand
  130.             ;corner of the window.
  131.  
  132.   UWORD frq_FontYSize     ;These fields are used to return the selected
  133.   UWORD frq_FontStyle     ;font size and style, only applicable when the
  134.             ;font bit is set.
  135.  
  136.   ;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
  137.   APTR  frq_ExtendedSelect    ; Linked list of ESStructures if more than one filename is chosen.
  138.   ;All of the following variables you shouldn't need to touch.  They contain fields that the file
  139.   ;requester sets and likes to preserve over calls, just to make life easier for the user.
  140.   STRUCT  frq_Hide,WILDLENGTH+2   ; Wildcards for files to hide.
  141.   STRUCT  frq_Show,WILDLENGTH+2   ; Wildcards for files to show.
  142.   WORD  frq_FileBufferPos   ; Cursor's  position  and first
  143.   WORD  frq_FileDispPos     ; displayed character number in
  144.   WORD  frq_DirBufferPos    ; the three string gadgets.  No
  145.   WORD  frq_DirDispPos      ; need  to initialized these if
  146.   WORD  frq_HideBufferPos   ; you don't want to.
  147.   WORD  frq_HideDispPos
  148.   WORD  frq_ShowBufferPos
  149.   WORD  frq_ShowDispPos
  150.  
  151. ;         The  following  fields are PRIVATE!  Don't go messing with them or
  152. ; wierd  things may/will happen.  If this isn't enough of a warning, go read
  153. ; the one in intuition.h, that should scare you off.
  154.  
  155.   APTR  frq_Memory      ; Memory allocated for dir entries.
  156.   APTR  frq_Memory2     ; Used for currently hidden files.
  157.   APTR  frq_Lock      ; Contains lock on directories being read across calls.
  158.   STRUCT  frq_PrivateDirBuffer,DSIZE+2  ; Used for keeping a record of which
  159.             ; directory we have file names for.
  160.   APTR  frq_FileInfoBlock
  161.   WORD  frq_NumEntries
  162.   WORD  frq_NumHiddenEntries
  163.   WORD  frq_filestartnumber
  164.   WORD  frq_devicestartnumber
  165.   LABEL frq_SIZEOF
  166.  
  167.  
  168.  
  169. Enjoy!
  170.  
  171. Steve.
  172.  
  173.